<template>
  <a-modal :width="1000" v-model:visible="showLogDialog" :footer="false" title="操作日志" title-align="start" :mask-closable="false" @cancel="closedDialog">
    <div class="ad-logs-wrap table-gl-w">
      <AdHandleLog :currentData="currentData" :entityTypes="entityTypes" />
    </div>
  </a-modal>
</template>
<script lang="ts" setup>
  import { ref } from 'vue'
  const emit = defineEmits(['closed'])
  import AdHandleLog from './adHandleLog.vue'
  const props = defineProps({
    isShow: {
      type: Boolean,
      default: false,
    },
    currentData: {
      type: Object,
      default: () => {},
    },
    entityTypes: {
      type: Array,
      default: () => [],
    },
  })

  const showLogDialog = ref(props.isShow)

  // 关闭
  function closedDialog() {
    showLogDialog.value = false
    emit('closed')
  }
</script>

<style lang="less" scoped>
  .ad-logs-wrap {
    height: calc(84vh - 100px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
</style>
